home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
rettig.arc
/
TRSOURCE.EXE
/
_TR_ATOI.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
456b
|
30 lines
/*********
*
* _TR_ATOI.C
* by Ralph Davis
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* SYNTAX: _tr_atoi( s );
* char *s;
*
* RETURNS: integer equivalent of s.
*
* This function replaces the C library routine atoi();
*
*********/
#include "trlib.h"
_tr_atoi( s )
char *s;
{
int num = 0;
for (; isdigit(*s); s++)
num = (num * 10) + (*s - '0');
return(num);
}